oxenstored: catch the error when a connection is already deleted
authorZheng Li <dev@zheng.li>
Thu, 25 Sep 2014 17:34:57 +0000 (18:34 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 8 Oct 2014 13:18:46 +0000 (14:18 +0100)
commit57ba43cdf804998fc7dd70025d870effb4b4686c
tree99f0e80bff8e6dbb38509812c8d3b5cfe774c943
parent6a0fa7ce2e0c06edfd8c7e4d5d6ac0bdd7b2a43b
oxenstored: catch the error when a connection is already deleted

The function process_fdset_with is called on the read set connections first.
During the process, it might destroy a connection and remove it from the
connections database if some errors occur. However, a reference to the same
connection might still exist in the write set, which is awaiting to be
processed next. In this case, a Not_found error will be raised and the process
is aborted.

This patch changes the logic to ignore connections just missing from the
connection database and continue the rest part of the work.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
tools/ocaml/xenstored/xenstored.ml